<template>
	<!-- 个人中心我的收藏 -->
	<view class="Jy_my_seckill_page">
		<view class="Jy_my_seckill_box">
			<view class="Jy_my_seckill_head_group">
				
			</view>
			<view class="Jy_collection_empty_group" v-if="collectionList.length == 0">
				<DataEmpty imageUrl="https://louiscloud-1304691295.cos.ap-guangzhou.myqcloud.com/home/%E6%9A%82%E6%97%A0%E6%94%B6%E8%97%8F.png" startPadding="true" bgColor="#fff" tipsText="暂无收藏"></DataEmpty>
			</view>
			<view class="Jy_my_seckill_content-group" v-else>
				<view class="Jy_my_seckill_content-box" v-for="(item, index) in collectionList" :key="index">
					<view class="Jy_my_seckill_content-container">
						<view class="left-image-box">
							<image :src="item.image" mode="aspectFill"></image>
						</view>
						<view class="right-image-box">
							<view class="right-name-box">
								<text>{{item.storeName}}</text>
							</view>
							<view class="right-price-group">
								<view class="left-price-box">
									<text>￥</text>
									<text>{{item.price}}</text>
								</view>
								<view class="right-button-box">
									<text>查看详情</text> 
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	// 数据为空
	import DataEmpty from '../../../../components/DataEmpty.vue';
	
	export default {
		components: {
			DataEmpty
		},
		data() {
			return {
				collectionList: [],
				page: 1,
				limit: 10
			};
		},
		onLoad() {
			this.getCollectionList()
		},
		methods: {
			getCollectionList() {
				let data = {
					page:this.page,
					limit:this.limit
				}
				this.sendRequest({
					url: "/api/front/collect/user",
					data: data,
					success: res => {
						this.collectionList = res.data.data.list;
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
@import "myCollection.scss";
</style>
